-- risker_compass
-- created by panyl
-- 冒险系罗盘

return {
    -- 获取道具描述
    getDesc = function(itemId, args, para)
        assert(type(args) == "string", "detail_args期望是string类型。");

        local compassInfo = ME.user.dbase:query("compass_info") or {};
        local usedTimes = tonumber(compassInfo["times"]);

        local maxUseTimes = RiskerEquipM.getCompassMaxTimes(itemId);

        return string.format(args, maxUseTimes - usedTimes, maxUseTimes);
    end,

    -- 获取道具细节描述
    getDetail = function(itemId, args, para)
        assert(type(args) == "string", "detail_args期望是string类型。");

        local compassInfo = ME.user.dbase:query("compass_info") or {};
        local usedTimes = tonumber(compassInfo["times"]);

        local maxUseTimes = RiskerEquipM.getCompassMaxTimes(itemId);

        return string.format(args, maxUseTimes - usedTimes, maxUseTimes);
    end,
};
